package com.flute.haflute.jobbox.base.mapreduce;

import com.flute.haflute.jobbox.base.InputResource;
import com.flute.haflute.jobbox.base.JobConf;


/**
 * MapReduce机制中的配置文件
 * ! ！该类初步实现，并不完全支持MR的所有属性，需随系统发展完善
 * @author Liu Liu
 *
 */
public class MRJobConf implements JobConf{
	private static final long serialVersionUID = 9146103029731804431L;
	
	/**
	 * 资源调度器，在以通道方式进行资源分发的应用中使用，类似于hadoop的inputSplit
	 */
	private Class<? extends InputResource> inputSourceClass;
	private String jobId;
	/**
	 * 任务描述
	 */
	private String jobDescription;
	/**
	 * Mapper
	 */
	private Class<? extends MapTaskBase> mapClass;
	/**
	 *字符串标记的应用特定的通信器，预留
	 */
	private String messagerName;
	/**
	 *mapper的数量
	 */
	private int numMapTasks = 1;
	/**
	 *reducer的数量
	 */
	private int numReduceTasks = 1;
	/**
	 * Reducer
	 */
	private Class<? extends ReduceTaskBase> reduceClass;
	
	@Override
	public String getJobId() {
		return jobId;
	}

	public void setJobId(String jobId) {
		this.jobId = jobId;
	}

	public Class<? extends MapTaskBase> getMapClass() {
		return mapClass;
	}

	public void setMapClass(Class<? extends MapTaskBase> mapClass) {
		this.mapClass = mapClass;	
	}

	public int getNumMapTasks() {
		return numMapTasks;
	}

	public void setNumMapTasks(int numMapTasks) {
		this.numMapTasks = numMapTasks;
	}

	public int getNumReduceTasks() {
		return numReduceTasks;
	}

	public void setNumReduceTasks(int numReduceTasks) {
		this.numReduceTasks = numReduceTasks;
	}

	public Class<? extends ReduceTaskBase> getReduceClass() {
		return reduceClass;
	}

	public void setReduceClass(Class<? extends ReduceTaskBase> reduceClass) {
		this.reduceClass = reduceClass;
	}

	public Class<? extends InputResource> getInputSourceClass() {
		return inputSourceClass;
	}

	public void setInputSourceClass(Class<? extends InputResource> inputResource) {
		this.inputSourceClass = inputResource;
	}

	public String getMessagerName() {
		return messagerName;
	}

	public void setMessagerName(String messagerName) {
		this.messagerName = messagerName;
	}

	public String getJobDescription() {
		return jobDescription;
	}

	public void setJobDescription(String jobDescription) {
		this.jobDescription = jobDescription;
	}

}
